﻿using System;
using System.Collections.Generic;
using UnityEngine;

namespace YummyGame.Framework
{
    public static class SkillPrototypeLib
    {
        private static Dictionary<string, SkillPrototype> _prototypes = new Dictionary<string, SkillPrototype>();
        public static SkillPrototype GetPrototype(string filePath)
        {
            if (_prototypes.ContainsKey(filePath)) return _prototypes[filePath];
            var proto = new SkillDescriptor(filePath).GetPrototype();
            _prototypes.Add(filePath, proto);
            return proto;
        }
    }
}
